package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import com.atguigu.tingshu.vo.user.UserSubscribeVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

public interface UserInfoService extends IService<UserInfo> {

    Map<String, String> wxLoginGetToken(String code);


    UserInfoVo getUserInfoVo(Long userId);

    Map<Long, Integer> userIsPaidTrack(Long userId, Long albumId, List<Long> needCheckPayStatusTrackIdList);

    Boolean  subscribe(Long albumId, Long userId);


    /**
     * 判断用户是否购买过指定专辑
     *
     * @param albumId
     * @return
     */
    Boolean isPaidAlbum(Long albumId, Long userId);

    List<Long> findUserPaidTrackList(Long userId, Long albumId);

    /**
     * 新增用户购买记录（声音、专辑、VIP）____虚拟物品发货接口
     * @param userPaidRecordVo
     * @return
     */
    void savePaidRecord(UserPaidRecordVo userPaidRecordVo);

    /**
     * 获取用户是否订阅
     * @param albumId
     * @param userId
     * @return
     */
    Boolean isSubscribe(Long albumId, Long userId);

    /**
     * 获取用户订阅分页列表
     * @param page1
     * @param userId
     * @return
     */
    Page<UserSubscribeVo> findUserSubscribePage(Page<UserSubscribeVo> page1, Long userId);
}
